﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ServerSide.Common.Types;
using System.Data.SqlClient;
using System.Data;
using ServerSide.Common;

namespace ServerSide.Requests
{


    [Request(IsRequestNeedLogin = true)]
    public class HelloRequest : IRequest
    {
        public string Name { get; set; }

        public object Process()
        {
            HelloRequestResult result = new HelloRequestResult();
            result.HelloString = "Hello" + Name;
            return (object)result;
        }
    }

    public class HelloRequestResult : IResult
    {
        public string HelloString { get; set; }
        public string ErrorMessage
        {
            get;
            set;
        }
    }

    public class Meyve
    {
        public String Adı { get; set; }

        public ResponseType responseTipi { get; set; }

    }

    public class MeyvelistesiRequest : IRequest
    {
        public int meyvesayisi { get; set; }
        public object Process()
        {
            List<Meyve> meyvelistesi = new List<Meyve>();

            for (int i = 0; i < meyvesayisi; i++)
            {
                Meyve m = new Meyve();
                m.Adı = "Adı" + i.ToString();
                m.responseTipi = ResponseType.Succes;
                meyvelistesi.Add(m);
            }
            MeyveListesiResult res = new MeyveListesiResult();
            res.meyveListesi = meyvelistesi;
            return (object)res;
        }
    }

    public class MeyveListesiResult
    {
        public List<Meyve> meyveListesi { get; set; }
    }
}